﻿using CPPEI.Configuration.Net;
using CPPEI.Coolzon.Configuration;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CPPEI.ShareScreen.Server
{
    [XConfigRoot("Environment")]
    public class XEnvironment
    {
        private static XEnvironment s_instance;
        public static XEnvironment Instance
        {
            get
            {
                if (s_instance == null)
                {
                    s_instance = new XEnvironment();
                }
                return s_instance;
            }
        }

        [XConfig("Host")]
        public HostConfig Host { get; set; }

        /// <summary>
        /// 获取Environment.xml文件的地址
        /// </summary>
        /// <returns></returns>
        public static string GetEnvironmentFilePath()
        {
            return string.Format("{0}{1}", AppDomain.CurrentDomain.BaseDirectory, "Config\\Environment.xml"); ;
        }
    }
}
